<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->get('users', 'UsersController@index');
    //话题
    Route::group(['namespace'=>'Topic'], function() {
        Route::get('topics', 'TopicsController@index');
    });
    //商品
    Route::group(['namespace'=>'Goods'], function() {
        Route::get('products', 'ProductsController@index');
        Route::get('products/create', 'ProductsController@create');
        Route::post('products', 'ProductsController@store');
        Route::get('products/{id}/edit', 'ProductsController@edit');
        Route::put('products/{id}', 'ProductsController@update');
    });
  
});
